package com.appbee.defaultapp.client.gin;


import javax.inject.Singleton;

import com.appbee.article.client.ui.IArticleStyle;
import com.appbee.cm.client.nav.ui.INavAdminStyle;
import com.appbee.cm.client.nav.ui.INavSelectStyle;
import com.appbee.cm.client.regionunit.ui.IRegionStyle;
import com.appbee.core.client.design.PageStyle;
import com.appbee.core.client.design.celltable.CellTableResources;
import com.appbee.core.client.design.editablecelllist.EditableCellListResources;
import com.appbee.core.client.htmleditor.toolbar.IToolbarStyle;
import com.appbee.core.client.ui.MessageStyle;
import com.appbee.defaultapp.client.design.ArticleStyle;
import com.appbee.defaultapp.client.design.StyleResource;
import com.appbee.defaultapp.client.design.celllist.SongListResourcesProvider;
import com.appbee.defaultapp.client.design.celltable.DefaultCellTableResources;
import com.appbee.defaultapp.client.design.editablecelllist.DefaultEditableCellListResources;
import com.appbee.defaultapp.client.design.gin.StyleResouceProvider;
import com.appbee.defaultapp.client.design.picasa.DefaultAlbumListResources;
import com.appbee.defaultapp.client.design.picasa.DefaultPhotosListResources;
import com.appbee.defaultapp.client.design.user.DefaultMemberCellListResources;
import com.appbee.defaultapp.client.design.youtube.DefaultYoutubeCellListResources;
import com.appbee.gdata.picasa.client.ui.IPicasaStyle;
import com.appbee.gdata.picasa.client.ui.design.AlbumListResources;
import com.appbee.gdata.picasa.client.ui.design.PhotosListResources;
import com.appbee.gdata.youtube.client.design.cells.YoutubeCellListResources;
import com.appbee.gdata.youtube.client.ui.IYoutubeStyle;
import com.appbee.news.client.ui.INewsStyle;
import com.appbee.songs.client.design.SongListResources;
import com.appbee.songs.client.ui.ISongEditStyle;
import com.appbee.songs.client.ui.ISongsStyle;
import com.appbee.user.client.design.MemberCellListResources;
import com.appbee.user.client.ui.IUserlistStyle;
import com.google.gwt.inject.client.AbstractGinModule;

public class DefaultDesignModul extends AbstractGinModule
{

	@Override
	protected void configure()
	{
		bind(StyleResource.class).toProvider(StyleResouceProvider.class)
				.in(Singleton.class);
		bind(IRegionStyle.class).to(StyleResource.class)
				.in(Singleton.class);
		bind(PageStyle.class).to(StyleResource.class)
				.in(Singleton.class);

		// Cell widgets
		bind(CellTableResources.class).to(DefaultCellTableResources.class)
				.in(Singleton.class);
		bind(EditableCellListResources.class)
				.to(DefaultEditableCellListResources.class).in(Singleton.class);
		bind(SongListResources.class)
				.toProvider(SongListResourcesProvider.class)
				.in(Singleton.class);

		// Message
		bind(MessageStyle.class).to(StyleResource.class)
				.in(Singleton.class);

		// NavAdmin
		bind(INavAdminStyle.class).to(StyleResource.class)
				.in(Singleton.class);
		bind(INavSelectStyle.class).to(StyleResource.class)
				.in(Singleton.class);

		// User
		bind(IUserlistStyle.class).to(StyleResource.class);
		bind(MemberCellListResources.class).to(DefaultMemberCellListResources.class)
				.in(Singleton.class);

		// Article
		bind(IArticleStyle.class).to(ArticleStyle.class).in(Singleton.class);
		bind(IToolbarStyle.class).to(StyleResource.class).in(Singleton.class);

		// News
		bind(INewsStyle.class).to(StyleResource.class).in(Singleton.class);

		// Playlist
		bind(ISongsStyle.class).to(StyleResource.class).in(Singleton.class);
		bind(ISongEditStyle.class).to(StyleResource.class).in(Singleton.class);
		// Youtube
		bind(IYoutubeStyle.class).to(StyleResource.class).in(Singleton.class);
		bind(YoutubeCellListResources.class)
				.to(DefaultYoutubeCellListResources.class).in(Singleton.class);

		// Picasa
		bind(IPicasaStyle.class).to(StyleResource.class)
				.in(Singleton.class);
		bind(AlbumListResources.class).to(DefaultAlbumListResources.class)
				.in(Singleton.class);
		bind(PhotosListResources.class).to(DefaultPhotosListResources.class)
				.in(Singleton.class);

	}

}
